Optimal. Leaf size=32 \[ a x (A+B)+\frac {a A \sin (c+d x)}{d}+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {3996, 3770} \[ a x (A+B)+\frac {a A \sin (c+d x)}{d}+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3996
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx &=\frac {a A \sin (c+d x)}{d}-\int (-a (A+B)-a B \sec (c+d x)) \, dx\\ &=a (A+B) x+\frac {a A \sin (c+d x)}{d}+(a B) \int \sec (c+d x) \, dx\\ &=a (A+B) x+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 46, normalized size = 1.44 \[ \frac {a A \sin (c) \cos (d x)}{d}+\frac {a A \cos (c) \sin (d x)}{d}+a A x+\frac {a B \tanh ^{-1}(\sin (c+d x))}{d}+a B x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 51, normalized size = 1.59 \[ \frac {2 \, {\left (A + B\right )} a d x + B a \log \left (\sin \left (d x + c\right ) + 1\right ) - B a \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.35, size = 79, normalized size = 2.47 \[ \frac {B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - B a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (A a + B a\right )} {\left (d x + c\right )} + \frac {2 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 56, normalized size = 1.75 \[ a A x +B x a +\frac {a A \sin \left (d x +c \right )}{d}+\frac {A a c}{d}+\frac {a B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {B a c}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 58, normalized size = 1.81 \[ \frac {2 \, {\left (d x + c\right )} A a + 2 \, {\left (d x + c\right )} B a + B a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.15, size = 100, normalized size = 3.12 \[ \frac {A\,a\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int A \cos {\left (c + d x \right )}\, dx + \int A \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________